#! /bin/bash

#同步信息流
PROC_NAME=FeedDispatch
ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l`
if [ $ProcNumber -le 0 ];then
   echo "queue is not run"
   cd /data/webdata/api && nohup php /data/webdata/api/artisan queue:work --queue=FeedDispatch,NotifyUsers &
   
else
   echo "queue is  running.."
fi

# 拉消息
PROC_NAME=im:get_im_message
ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l`
if [ $ProcNumber -le 0 ];then
   echo "im:get_im_message is not run"
   cd /data/webdata/api && nohup php /data/webdata/api/artisan im:get_im_message  &
else
   echo "im:get_im_message is  running.."
fi

